export const constantRoutes = [
  // {
  //   path: '/',
  //   redirect: '/layout',
  // },
  {
    path: '/login',
    component: () => import('../views/login/index.vue'),
    name: 'login',
    meta: { title: '登录', hidden: true, icon: 'User' },
  },
  {
    path: '/grid',
    component: () => import('../views/grid/grid.vue'),
    name: 'grid',
    meta: { title: '计算器', hidden: false, icon: 'Calculator' },
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: { title: '', icon: '' },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: { title: '首页', icon: 'HomeFilled' },
      },
    ],
  },
  {
    path: '/screen',
    component: () => import('../views/screen/index.vue'),
    name: 'screen',
    meta: { title: '数据大屏', hidden: false, icon: 'Histogram' },
  },
  {
    path: '/auth',
    component: () => import('@/layout/index.vue'),
    name: 'auth',
    meta: { title: '权限管理', hidden: false, icon: 'Lock' },
    redirect: '/auth/user',
    children: [
      {
        path: '/auth/user',
        component: () => import('@/views/auth/user/index.vue'),
        meta: { title: '用户管理', icon: 'User' },
      },
      {
        path: '/auth/role',
        component: () => import('@/views/auth/role/index.vue'),
        meta: { title: '角色管理', icon: 'UserFilled' },
      },
      {
        path: '/auth/permission',
        component: () => import('@/views/auth/permission/index.vue'),
        meta: { title: '菜单管理', icon: 'List' },
      },
    ],
  },
  {
    path: '/product',
    component: () => import('@/layout/index.vue'),
    name: 'product',
    meta: { title: '商品管理', hidden: false, icon: 'Box' },
    redirect: '/product/attr',
    children: [
      {
        path: '/product/attr',
        component: () => import('@/views/product/attr/index.vue'),
        meta: { title: '商品属性', icon: 'List' },
      },
      {
        path: '/product/trademark',
        component: () => import('@/views/product/trademark/index.vue'),
        meta: { title: '品牌管理', icon: 'Plus' },
      },
      {
        path: '/product/sku',
        component: () => import('@/views/product/sku/index.vue'),
        meta: { title: '品牌管理2', icon: 'Plus' },
      },
    ],
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: { title: '404', hidden: true },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'notFound',
    meta: { title: '任意路由重定向', hidden: true },
  },
]
